﻿<!--
    Dialog CoHoi
    Use for create CoHoi
    >>> Author: cyworld8x
-->
<Window  
        xmlns:toolkit="clr-namespace:Microsoft.Windows.Controls;assembly=WPFToolkit"  
        x:Class="OODCRM.CoHoiDialog"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="Dialog Cơ hội" Height="690" Width="Auto" MinHeight="610" MinWidth="600">
    <Grid Grid.Row="0">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*"/>
            <ColumnDefinition Width="*"/>

        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>

            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>
        <Border Margin="5" CornerRadius="5" Grid.ColumnSpan="2" BorderBrush="#FF149A08" BorderThickness="1">
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="110"/>
                    <ColumnDefinition Width="0.5*"/>
                    <ColumnDefinition Width="*"/>

                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>

                </Grid.RowDefinitions>

                <TextBlock Text="Mã hiệu (*)"  Margin="5"/>
                <TextBox x:Name="tbxMaHieu_tabThemCoHoiDialog" Grid.Column="1" Margin="5" Grid.ColumnSpan="1"
                         MinWidth="150" Text="{Binding MaHieu}"/>
                <TextBlock Text="Tên cơ hội (*)" Margin="5" Grid.Row="1"/>
                <TextBox x:Name="tbxTenCoHoi_tabThemCoHoiDialog" Grid.Row="1" Grid.ColumnSpan="1" 
                         Grid.Column="1"  Margin="5"
                         Text="{Binding TenChienDich}"  />
                <TextBlock Text="Tên tổ chức (*)" Margin="5" Grid.Row="2"/>
                <ComboBox x:Name="cbxToChuc_tabThemCoHoiDialog" Grid.Row="2" 
                          Grid.Column="1"  Margin="5" Grid.ColumnSpan="1" 
                          SelectedValue="{Binding CHITIETPHANLOAILIENHE}">
                    <ComboBox.ItemTemplate>
                        <DataTemplate>
                            <TextBlock Text="{Binding TenPhanLoai}"/>
                        </DataTemplate>
                    </ComboBox.ItemTemplate>
                </ComboBox>
                <TextBlock Text="Chiến dịch" Margin="5" Grid.Row="3"/>
                <ComboBox x:Name="cbxChienDich_tabThemCoHoiDialog" Grid.Row="3" 
                          Grid.Column="1"  Margin="5" Grid.ColumnSpan="1" 
                          SelectedValue="{Binding CHITIETPHANLOAILIENHE}">
                    <ComboBox.ItemTemplate>
                        <DataTemplate>
                            <TextBlock Text="{Binding TenPhanLoai}"/>
                        </DataTemplate>
                    </ComboBox.ItemTemplate>
                </ComboBox>
            </Grid>
        </Border>
        <Border Margin="5" CornerRadius="5" Grid.ColumnSpan="2" Grid.Row="1" BorderBrush="#FF149A08" BorderThickness="1">
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="110"/>
                    <ColumnDefinition Width="0.3*"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="0.3*"/>

                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>

                </Grid.RowDefinitions>

                <TextBlock Text="Loại" Margin="5"/>
                <ComboBox x:Name="cbxLoai_tabThemCoHoiDialog" Grid.Row="0" 
                          Grid.Column="1"  Margin="5"
                          SelectedValue="{Binding CHITIETPHANLOAILIENHE}">
                    <ComboBox.ItemTemplate>
                        <DataTemplate>
                            <TextBlock Text="{Binding TenPhanLoai}"/>
                        </DataTemplate>
                    </ComboBox.ItemTemplate>
                </ComboBox>
                <TextBlock Text="Doanh thu kỳ vọng " Margin="5" Grid.Row="0" Grid.Column="2"/>
                <TextBox x:Name="tbxDoanhThuKyVong_tabThemCoHoiDialog" Grid.Row="0" 
                         Grid.Column="3"  Margin="5" 
                         Text="{Binding ST}"  />
                <TextBlock Text="Nguồn gốc" Margin="5" Grid.Row="1"/>
                <ComboBox x:Name="cbxNguonGoc_tabThemCoHoiDialog" Grid.Row="1" 
                          Grid.Column="1" Margin="5"
                          SelectedValue="{Binding CHITIETPHANLOAILIENHE}">
                    <ComboBox.ItemTemplate>
                        <DataTemplate>
                            <TextBlock Text="{Binding TenPhanLoai}"/>
                        </DataTemplate>
                    </ComboBox.ItemTemplate>
                </ComboBox>
                <TextBlock Text="Bước tiếp theo " Margin="5" Grid.Row="1" Grid.Column="2"/>
                <ComboBox x:Name="cbxBuocTiepTheo_tabThemCoHoiDialog" Grid.Row="1" 
                          Grid.Column="3" Margin="5"
                          SelectedValue="{Binding CHITIETPHANLOAILIENHE}">
                    <ComboBox.ItemTemplate>
                        <DataTemplate>
                            <TextBlock Text="{Binding TenPhanLoai}"/>
                        </DataTemplate>
                    </ComboBox.ItemTemplate>
                </ComboBox>
                <TextBlock Text="Số tiền " Margin="5" Grid.Row="2" Grid.Column="0"/>
                <TextBox x:Name="tbxSoTien_tabThemCoHoiDialog" Grid.Row="2" 
                         Grid.Column="1"  Margin="5" 
                         Text="{Binding ST}"  />
                <TextBlock Text="Lý do thắng/thua " Margin="5" Grid.Row="2" Grid.Column="2"/>
                <ComboBox x:Name="cbxLyDoThangThua_tabThemCoHoiDialog" Grid.Row="2" 
                          Grid.Column="3" Margin="5"
                          SelectedValue="{Binding CHITIETPHANLOAILIENHE}">
                    <ComboBox.ItemTemplate>
                        <DataTemplate>
                            <TextBlock Text="{Binding TenPhanLoai}"/>
                        </DataTemplate>
                    </ComboBox.ItemTemplate>
                </ComboBox>
                <TextBlock Text="Giai đoạn (*)" Margin="5" Grid.Row="4"/>
                <ComboBox x:Name="cbxGiaiDoan_tabThemCoHoiDialog" Grid.Row="4" 
                          Grid.Column="1" Margin="5"
                          SelectedValue="{Binding CHITIETPHANLOAILIENHE}">
                    <ComboBox.ItemTemplate>
                        <DataTemplate>
                            <TextBlock Text="{Binding TenPhanLoai}"/>
                        </DataTemplate>
                    </ComboBox.ItemTemplate>
                </ComboBox>
                <TextBlock Text="Ngày kỳ vọng (*)" Margin="5" Grid.Row="4" Grid.Column="2"/>
                <toolkit:DatePicker x:Name="dpNgayKyVong_tabThemCoHoiDialog" Grid.Row="4" Grid.Column="3" 
                          Margin="5" Text="{Binding NgayKetThuc}"  />
                <TextBlock Text="Tỉ lệ thành công " Margin="5" Grid.Row="5" Grid.Column="0"/>
                <TextBox x:Name="tbxTiLeThanhCong_tabThemCoHoiDialog" Grid.Row="5" 
                         Grid.Column="1"  Margin="5" 
                         Text="{Binding ST}"  />

                <TextBlock Text="Chủ sở hữu (*)" Margin="5" Grid.Column="2" Grid.Row="5"/>
                <ComboBox x:Name="cbxChuSoHuu_tabThemCoHoiDialog" Grid.Row="5" 
                          Grid.Column="3" Margin="5"
                          SelectedValue="{Binding CHITIETPHANLOAILIENHE}">
                    <ComboBox.ItemTemplate>
                        <DataTemplate>
                            <TextBlock Text="{Binding TenPhanLoai}"/>
                        </DataTemplate>
                    </ComboBox.ItemTemplate>
                </ComboBox>
                <TextBlock Text="Phân loại (*)" Margin="5" Grid.Row="6"/>
                <ComboBox x:Name="cbxPhanLoai_tabThemCoHoiDialog" Grid.Row="6" 
                          Grid.Column="1" Margin="5"
                          SelectedValue="{Binding CHITIETPHANLOAILIENHE}">
                    <ComboBox.ItemTemplate>
                        <DataTemplate>
                            <TextBlock Text="{Binding TenPhanLoai}"/>
                        </DataTemplate>
                    </ComboBox.ItemTemplate>
                </ComboBox>
                <CheckBox x:Name="chkDungChung_tabThemCoHoiDialog" Content="Dùng chung" Margin="5,5,5,5" 
                  VerticalAlignment="Top" HorizontalAlignment="Left" Grid.Column="4" Grid.Row="6"
                  IsChecked="{Binding NgungTheoDoi}"/>
                <TextBlock Text="Diễn giải " Margin="5" Grid.Row="7" Grid.Column="0"/>
                <TextBox x:Name="tbxDienGiai_tabThemCoHoiDialog" Grid.Row="7" 
                         Grid.Column="1"  Margin="5" Grid.ColumnSpan="3" MinHeight="80"
                         Text="{Binding ST}"  />



            </Grid>
        </Border>
        <Border Margin="5" CornerRadius="5" Grid.Row="3" Grid.ColumnSpan="2" >
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="*"/>
                    <ColumnDefinition Width="120"/>
                    <ColumnDefinition Width="120"/>
                    <ColumnDefinition Width="120"/>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>

                </Grid.RowDefinitions>
                <CheckBox x:Name="chkKetThuc_tabThemCoHoiDialog" Content="kết thúc" Margin="5,5,5,5" 
                  VerticalAlignment="Top" HorizontalAlignment="Left"
                  IsChecked="{Binding NgungTheoDoi}"/>
                <TextBlock Text="Ngày kết thúc" Margin="5" Grid.Column="2" Grid.Row="0" HorizontalAlignment="Right"/>
                <toolkit:DatePicker x:Name="dpNgayketThuc_tabThemCoHoiDialog" Grid.Row="0" Grid.Column="3" HorizontalAlignment="Left" 
                          Margin="5" Text="{Binding NgayKetThuc}"  />
                <Button x:Name="btnCat_tabThemCoHoiDialog" Content="Cất" Grid.Row="1" Grid.Column="2" Margin="5,10,10,5" 
                HorizontalAlignment="Right" VerticalAlignment="Top"
                Width="100" Height="35"  IsDefault="True"/>
                <Button x:Name="btnHuyBo_tabThemCoHoiDialog" Content="Huỷ bỏ" Grid.Row="1" Grid.Column="3" Margin="5,10,10,5" 
                HorizontalAlignment="Right" VerticalAlignment="Top"
                Width="100" Height="35" IsCancel="True"/>

            </Grid>
        </Border>
    </Grid>
</Window>
